package com.core.domain;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.experimental.Accessors;

import java.util.Date;
import java.util.Map;

/**
 * @author: stefanie-zy
 * @time: 2024/1/24-13:59
 * @description: Po-公共继承
 */
@Data
@Schema(name = "Po-公共继承")
@Accessors(chain = true)
public class CorePo {

    @Schema(description = "主键")
    @TableId(type = IdType.AUTO)
    private Long id;

    @Schema(description = "创建名称")
    private String createName;

    @Schema(description = "创建时间")
    @OrderBy(sort = Short.MAX_VALUE)
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;

    @Schema(description = "修改名称")
    private String updateName;

    @Schema(description = "修改时间")
    @TableField(fill = FieldFill.UPDATE)
    private Date updateTime;

    @Schema(description = "备注")
    private String remark;

    @Schema(description = "自定义参数")
    @TableField(typeHandler = JacksonTypeHandler.class)
    private Map<String, Object> params;
}
